package com.pro.system.entity;

import lombok.Data;

import javax.persistence.*;

@Entity
@Data
@Table(name = "purchase")
public class Purchase {
    @Id
    private Integer purchaseId;  //订单号

    private String news;  //订单信息

    @ManyToOne(
            fetch = FetchType.LAZY,
            cascade = {
                        CascadeType.DETACH,
                        CascadeType.MERGE,
                        CascadeType.PERSIST,
                        CascadeType.REFRESH
             }
    )
    @JoinColumn(name = "pay_id")
    private Pay pay;

    public Purchase(){

    }
}
